package com.job.Gai_Yian.Homework0714;

/**
 * @author Gai_Yian
 * @version 1.0
 * @since 2022-07-15 00:34:54
 */
public class Item {
    private String name;

    public Item(String name) {
        this.name = name;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    @Override
    public void finalize() throws Throwable{
        System.out.println(this.name+"临终的行为：释放一些自己占用的资源或者我的宝藏在第三棵树下面！");
    }
}
